function Node(value) {
    this.value = value;
    this.next = null;
}

function List(node) {
    this.node = new Node(node);

    // 查找节点
    this.find = function (target) {
        let current = this.node;
        while (current.value !== target) {
            current = current.next;
            if (!current) return false;
        }
    }

    // 插入节点
    this.insert = function (newNode, target) {
        let newNode = new Node(newNode);
        let insertNode = this.find(target);
        newNode.next = insertNode.next;
        insertNode.next = newNode;
    }

    // 删除节点
    this.remove = function (target) {
        let removeNode = this.find(target);
        let prevNode = this.findPre(removeNode);
        prevNode.next = removeNode.next;
    }

    this.findPre = function (target) {
        let current = this.node;
        while (!current.next && current.next.value !== target) {
            current = current.next
        }
        return current;
    }
}